<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="/bzbs/manager/layer/jquery-1.9.1.js"></script>
<link rel="stylesheet" type="text/css" href="/bzbs/css/style.css" />

<!-- 你必须先引入jQuery1.8或以上版本 -->

<script type="text/javascript">
	$(function() {
		//给所有的li绑定over事件
		$(".commodity").mouseover(function() {
			$(this).removeClass("out");
			$(this).addClass("over");
		});

		//给所有的li绑定out事件
		$(".commodity").bind("mouseout", function() {
			$(this).removeClass("over");
			$(this).addClass("out");
		});

		//退出功能
		$("#q5").click(function() {
			var flag = window.confirm("你确定要退出吗?");
			if (flag) {
				window.top.location.href = "demo15";
			}
		});
	});

	//搜索
	function sou(obj) {
		var a = "${name1}";
		var b = $("#in").val();
		if (b == "") {
			window.location.href = "/store/demo29?name=" + a;
			return;
		}
		window.location.href = "/store/demo29?name=" + b;
	}
</script>


<style type="text/css">
* {
	padding: 0;
	margin: 0;
}
body{
	background: url("/bzbs/manager/seat/img/bj.jpg") repeat;
	background-size: 100%;
}

#container {
	margin: 0 auto;
	width: 100%;
	/* background-color: #6cf; */
}

#header {
	height: 95px;
}

#header .tupian {
	width:200px;
	height:100px;
	float:left;
	margin-left:20px;
}


#header  .sou {
	float: right;
	width: 570px;
	margin-top: 35px;
	margin-right: 150px;
}

#header  .sou .sousuo {
	width: 560px;
	float: left;
	border: 2px solid red;
}

#header  .sou .kuang {
	width: 466px;
	height: 27px;
	float: left;
	padding: 4px 4px;
	line-height: 24px;
	border: none;
}

#header  .sou .souzi {
	width: 86px;
	float: right;
	background: red;
}

#header  .sou .souzi a {
	display: block;
	font-size: 16px;
	font-weight: 700;
	color: white;
	text-align: center;
	line-height: 35px;
	text-decoration: none;
}
#nav {
	position: relative;
	margin: 8 auto;
	width: 100%;
	height: 10px;
	float: left;
	border-bottom: 2px solid red;
}

.huanying {
	margin-left: 10px;
	height: 20px;
	width: 200px;
	float: left;
	background: red;
	text-align: center;
	border-radius: 10px;
}

#main {
		margin-top: 25px;
		height:500px;
		display: inline-block;	
			text-align: center;
			
	
}
.commodity{
	margin-left: 65px;
	margin-bottom: 2px;
	width: 180px;
	height: 230px;
	float: left;
	border: 1px solid white;
	position:relative;
	

}

.commodity .picture {
	
	margin-top: 10px;
	text-align: center;
}

.commodity .price {
	width: 150px;
	height: 10px;
	color:red;
	font-size:20px;
	text-align: center;
	
}
.commodity .picture img {
	width: 120px;
	height: 150px;
	text-align: center;
	
}


.commodity .name{
	margin-left: 10px;
	margin-top: 20px;
		text-align: left;
	
	
}

#footer {
		margin-top: 0px;
	height: 20px;
	
}
#b {
	font-size: 15px;
	/* font-family:微软雅黑  ; */
	text-decoration: none;
	color: black;
}

#b:hover {
	color: red;
}

.over {
	border: 1px solid #6cf;
}

.out {
	border: 1px solid white;
}
</style>
</head>
<body>

	<div id="container">
		<div id="header">
			<div class="tupian">
				<img src="/bzbs/system/img/logo.png"
					style="width: 210px; height: 100px" />
			</div>

			<div class="sou">
				<div class="sousuo">
					<input id="in" type="text" class="kuang" name="name"
						required="required" style="color: #999; font-size: 14px"
						value="${name1}" />
					<div class="souzi">
						<a href="javascript:void(0)" onclick="sou(this)">搜索</a>
					</div>
				</div>
			</div>
			<div id="nav" >
			<div class="huanying">
				<font color="white">欢迎来到百占百胜在线商城</font>
			</div>
		</div>

		</div>
		
		
		
		
		<div id="main">
			<c:forEach items="${pageInfo.list}" var="commodity" varStatus="index">
			<div class="commodity">

				<div class="picture">
					<a href="<%=path%>/commodity/queryone2.do?commId=${commodity.commId}"><img
						src="<%=path%>/shoponline/img/${commodity.imgName}" /></a>
				</div>

				<div class="price">
					￥${commodity.price}
				</div>

				<div class="name">
					<a id="b" href="<%=path%>/commodity/queryone2.do?commId=${commodity.commId}">${commodity.commName}</a>
				</div>

			</div>
		</c:forEach>
			
		</div>
		
		
		
		
		
		<div id="footer">
			<div class="pagin">
		<div class="message">
			<%-- 共<i class="blue">${pageInfo.total}</i>条记录， --%>
			共<i class="blue">${pageInfo.pages }</i>页&nbsp;当前显示第&nbsp;<i
				class="blue">${pageInfo.pageNum }&nbsp;</i>页 &nbsp;&nbsp;&nbsp;
		</div>
		<ul class="paginList" style="background-color: #6cf"}>

			<li class="paginItem"><a
				href="<%=path%>/commodity/query2.do?pageNum=1&pageSize=${pageInfo.pageSize }">首页</a></li>
			<li class="paginItem"><a
				href="<%=path%>/commodity/query2.do?pageNum=${pageInfo.pageNum-1 }&pageSize=${pageInfo.pageSize }">上一页</a></li>
			<%-- <c:forEach begin="1" end="${pageInfo.pages }" var="i">
	         	 <li class="paginItem">
	         	 	<a  href="<%=path%>/illegal/myIllegal.do?personId=${sessionScope.user.id}&pageNum=${i }&pageSize=${pageInfo.pageSize }">
	         	 		<font ${pageInfo.pageNum==i?'color="red"':'' }>${i }</font>
	         	 	</a>
	         	 </li>
	         </c:forEach> --%>
			<li class="paginItem"><a
				href="<%=path%>/commodity/query2.do?pageNum=${pageInfo.pageNum+1 }&pageSize=${pageInfo.pageSize }">下一页</a></li>
			<li class="paginItem"><a
				href="<%=path%>/commodity/query2.do?pageNum=${pageInfo.pages }&pageSize=${pageInfo.pageSize }">尾页</a></li>
		</ul>
	</div>
		
		</div>
	</div>


</body>
</html>












